﻿using System;
using System.Collections.Generic;

using E.Enum;

namespace E.Model
{
    [Serializable]
    public class TeacherModel
    {
        public TeacherModel() { }

        private int _id;
        private string _loginid;
        private string _pwd;
        private string _name;

        private IList<DictAreaModel> _arealist;

        public int ID
        {
            get;
            set;
        }

        public string LoginID
        {
            get;
            set;
        }

        public string Pwd
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public IList<DictAreaModel> AreaList
        {
            get;
            set;
        }

        public string Email { get; set; }
        public bool Gender { get; set; }

        public EnumTeacherAuthority Authority { get; set; }

        public string[] AreaStrList { get; set; }

        public int ForgetPwdQuestionID { get; set; }
        public string ForgetPwdAnswer { get; set; }

        /// <summary>
        /// 内训教师使用，外训教师，该字段为-1，用于代替项目组概念
        /// </summary>
        public int CertificateID { get; set; }

        /// <summary>
        /// 简单管理员权限，如果为-1则为一般管理员，不具有新增管理员的功能
        /// </summary>
        public int A2 { get; set; }
    }

    [Serializable]
    public class SearchTeacherModel
    {
        public int SelfID { get; set; }
        public string LoginID { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public int AreaID { get; set; }
        public int ProjectID { get; set; }      //内训用
        public int DelFlag { get; set; }
    }

    [Serializable]
    public class TeacherListModel
    {
        public int TotalCount { get; set; }
        public IList<ShortTeacherModel> List { get; set; }
    }

    [Serializable]
    public class ShortTeacherModel
    {
        public int ID { get; set; }
        public string LoginID { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public bool Gender { get; set; }
        public bool DelFlag { get; set; }
    }
    
    [Serializable]
    public class QandAModel
    {
        public int ID { get; set; }
        public int ParentID { get; set; }
        public int UserID { get; set; }
        public string UserName { get; set; }
        public int TeacherID { get; set; }
        public string TeacherName { get; set; }
        public string Content { get; set; }
        public DateTime AddDate { get; set; }
        public bool IsReply { get; set; }
        public IDictionary<string, DateTime> ReplyInfo { get; set; }
    }

    [Serializable]
    public class ShortQandAModel
    {
        public int ID { get; set; }
        public int UserID { get; set; }
        public string UserName { get; set; }
        public string TeacherName { get; set; }
        public int TeacherID { get; set; }
        public DateTime AddDate { get; set; }
        public bool IsReply { get; set; }
        public bool IsNew { get; set; }
    }

    [Serializable]
    public class QandAListModel
    {
        public int TotalCount { get; set; }
        public IList<ShortQandAModel> List { get; set; }
    }

    [Serializable]
    public class SearchQandAListModel
    {
        public int ID { get; set; }
        public int UserID { get; set; }
        public string UserName { get; set; }
        public int TeacherID { get; set; }
        public string TeacherName { get; set; }
        public string FromDate { get; set; }
        public string ToDate { get; set; }
        public int AreaID { get; set; }
        public int IsReply { get; set; }
        public int IsNew { get; set; }
    }

    [Serializable]
    public class PwdQuestionModel
    {
        public int ID { get; set; }
        public int TeacherID { get; set; }
        public string Title { get; set; }
        public string Answer { get; set; }
    }
}
